<?php
namespace app\common\loglic;

class Form
{
    public function keys()
    {
        return array_keys($this->items());
    }

    public function items($data=[])
    {
        return $data;
    }

    //keyValue互转
    protected function optionFlip($array=[])
    {
        $result = [];
        foreach($array as $key=>$value){
            $result[$value] = $value;
        }
        return $result;
    }

    //获取主题列表
    protected function optionTheme()
    {
        $files = [];
        foreach (glob($path.'./view/*') as $i=>$file){
            $basename = basename($file);
            $files[$basename] = $basename;
        }
        return $files;
    }
}